/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ez2find.model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;

/**
 *
 * @author Owner
 */
@NamedQueries(value={@NamedQuery(name="listAllHousCategories", query="SELECT h FROM CategoriaInmobiliario h ORDER BY h.categorie")})

@Entity
public class CategoriaInmobiliario implements Serializable{

    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE)
    private long id;
    private String categorie;
    @OneToMany(mappedBy="housCategorie",cascade=CascadeType.REMOVE)
    private List<Hous> housing;
    @OneToMany(mappedBy="housCategorie",cascade=CascadeType.REMOVE)
    private List<HousPrice> housPrices;
    
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getCategorie() {
        return categorie;
    }

    public void setCategorie(String categorie) {
        this.categorie = categorie;
    }

    public List<Hous> getHousing() {
        return housing;
    }

    public void setHousing(List<Hous> housing) {
        this.housing = housing;
    }

    public List<HousPrice> getHousPrices() {
        return housPrices;
    }

    public void setHousPrices(List<HousPrice> housPrices) {
        this.housPrices = housPrices;
    }

}
